@extends('admin::layouts.master')
@section('title')
    积分订单
@endsection
@section('tab')
    <div class="layui-fluid">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="layui-card-body ">
                        <form class="layui-form layui-col-space5">
                            <div class="layui-input-inline layui-show-xs-block" style="width: 300px; ">
                                <input type="text" name="key_word" placeholder="订单号" value="{{$arr_search['key_word']}}" autocomplete="off" class="layui-input"></div>

                            <div class="layui-input-inline layui-show-xs-block">
                                <select name="pay_state">
                                    <option value="">是否支付</option>
                                    <option value="1" @if($arr_search['pay_state']== 1 ) selected @endif>未支付</option>
                                    <option value="2" @if($arr_search['pay_state']== 2 ) selected @endif>已支付</option>
                                </select>
                            </div>

                            <div class="layui-input-inline layui-show-xs-block">
                                <button class="layui-btn" lay-submit="" lay-filter="sreach">
                                    <i class="layui-icon">&#xe615;</i></button>
                                <a class="layui-btn" onclick="location.reload()">
                                    <i class="layui-icon layui-icon-refresh"></i>
                                </a>
                            </div>

                        </form>
                    </div>
                    <div class="layui-card-body layui_overflow_y ">
                        <table class="layui-table layui-form">
                            <thead>
                            <tr>
                                <th>序号</th>
                                <!-- <th>商品图片</th> -->
                                <th>订单号</th>
                                <th>订单类型</th>
                                <th>用户</th>
                                <th>用户手机</th>
                                <th>预约时间</th>
                                <th>预约时间段</th>
                                <th>预约数量</th>
                                <th>检测站</th>
                                <th>检测站电话</th>
                                <th>年检费用</th>
                                <th>备注</th>
                                <th>支付方式</th>
                                <th>支付状态</th>
                                <th>订单状态</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            @foreach($data as $key=>$value)
                            <tr>
                                <td>{{ $key + 1 }}</td>
                                <td>{{$value['order_sn']}}</td>
                                <td>{{$value['extend']['main_type']['name']}}</td>
                                <td>{{$value['user']['nickname']}}</td>
                                <td>{{$value['user']['phone']}}</td>
                                <td>{{$value['appointment_date']}}</td>
                                <td>{{$value['appointment_times'] }}</td>
                                <td>{{$value['appointment_num']}}</td>
                                <td>{{$value['shop']['name']}}</td>
                                <td>{{$value['shop']['phone']}}</td>
                                <td>￥{{$value['price']}}</td>
                                <td>{{$value['remarks']}}</td>
                                <td>{{$value['extend']['payment_method']['name'] }}</td>
                                <td>{{$value['extend']['pay_state']['name'] }}</td>
                                <td>{{ $value['extend']['order_state']['name'] }}</td>
                                <td class="td-manage">
                                    <button class="layui-btn layui-btn-xs" onclick="parent.xadmin.add_tab('预约单-{{$value['order_sn']}}','{{route("admin_shop_order_checkpoint_detail",['id'=>$value['id']])}}',true)" href="javascript:;" >详情</button>
                                </td>
                            </tr>
                            @endforeach
                            @if(empty($data))
                                <td colspan="66" align="center">暂无数据</td>
                            @endif
                            </tbody>
                        </table>
                    </div>
                    <div class="layui-card-body ">
                        <div class="page">
                            {{$page_link}}
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

@endsection


@section('tab_js')
    <script>
     


    </script>
@endsection




